package com.swq.java.code.chapter08.code03;

import com.swq.java.code.chapter08.other.RenterIFC;

import java.util.Set;
import java.util.HashSet;

/**
 * 房屋中介市场
 */
public class HouseMarket {
    private static Set<RenterIFC> renters = new HashSet<RenterIFC>();

    public static void registerRenter(RenterIFC renter) {
        renters.add(renter);
    }

    public static RenterIFC findRenter() {
        return (RenterIFC) renters.iterator().next();
    }
}